import json

# 显卡信息列表，每个元素是一个包含显卡名称和计算能力的元组
gpu_info = [
    ("NVIDIA GeForce RTX 4090", 8.9),
    ("NVIDIA GeForce RTX 4080 SUPER", 8.9),
    ("NVIDIA GeForce RTX 4080", 8.9),
    ("NVIDIA GeForce RTX 4070 Ti SUPER", 8.9),
    ("NVIDIA GeForce RTX 4070 Ti", 8.9),
    ("NVIDIA GeForce RTX 4070 SUPER", 8.9),
    ("NVIDIA GeForce RTX 4070", 8.9),
    ("NVIDIA GeForce RTX 4060 Ti", 8.9),
    ("NVIDIA GeForce RTX 4060", 8.9),
    ("NVIDIA GeForce RTX 4050", 8.9),
    ("NVIDIA GeForce RTX 3090 Ti", 8.6),
    ("NVIDIA GeForce RTX 3090", 8.6),
    ("NVIDIA GeForce RTX 3080 Ti", 8.6),
    ("NVIDIA GeForce RTX 3080", 8.6),
    ("NVIDIA GeForce RTX 3070 Ti", 8.6),
    ("NVIDIA GeForce RTX 3070", 8.6),
    ("NVIDIA GeForce RTX 3060 Ti", 8.6),
    ("NVIDIA GeForce RTX 3060", 8.6),
    ("NVIDIA GeForce RTX 3050 Ti", 8.6),
    ("NVIDIA GeForce RTX 3050", 8.6),
    ("NVIDIA GeForce RTX 2080 Ti", 7.5),
    ("NVIDIA GeForce RTX 2080 SUPER", 7.5),
    ("NVIDIA GeForce RTX 2080", 7.5),
    ("NVIDIA GeForce RTX 2070 SUPER", 7.5),
    ("NVIDIA GeForce RTX 2070", 7.5),
    ("NVIDIA GeForce RTX 2060 SUPER", 7.5),
    ("NVIDIA GeForce RTX 2060", 7.5),
    ("NVIDIA GeForce RTX 1660 Ti", 8.6),
    ("NVIDIA GeForce RTX 1660 SUPER", 7.5),
    ("NVIDIA GeForce RTX 1660", 7.5),
    ("NVIDIA GeForce GTX 1650 Ti", 7.5),
    ("NVIDIA GeForce GTX 1650 SUPER", 7.5),
    ("NVIDIA GeForce GTX 1650", 7.5),
    ("NVIDIA TITAN RTX", 7.5),
    ("NVIDIA TITAN V", 7.0),
    ("NVIDIA TITAN Xp", 6.1),
    ("NVIDIA TITAN X", 6.1),
    ("NVIDIA GeForce GTX 1080 Ti", 6.1),
    ("NVIDIA GeForce GTX 1080", 6.1),
    ("NVIDIA GeForce GTX 1070 Ti", 6.1),
    ("NVIDIA GeForce GTX 1070", 6.1),
    ("NVIDIA GeForce GTX 1060", 6.1),
    ("NVIDIA GeForce GTX 1050 Ti", 6.1),
    ("NVIDIA GeForce GTX 1050", 6.1),
    ("NVIDIA H100", 9.0),
    ("NVIDIA L4", 8.9),
    ("NVIDIA L40", 8.9),
    ("NVIDIA A800", 8.0),
    ("NVIDIA A100", 8.0),
    ("NVIDIA A40", 8.6),
    ("NVIDIA A30", 8.0),
    ("NVIDIA A10", 8.6),
    ("NVIDIA A16", 8.6),
    ("NVIDIA A2", 8.6),
    ("NVIDIA T4", 7.5),
    ("NVIDIA V100", 7.0),
    ("Tesla P100", 6.0),
    ("Tesla P40", 6.1),
    ("Tesla P4", 6.1),
]

# 为了去除重复项，我们可以使用字典来自动处理重复的键
gpu_dict = {name: compute_capability for name, compute_capability in gpu_info}

# 将字典转换为JSON格式并写入文件
with open('gpu_capabilities.json', 'w') as json_file:
    json.dump(gpu_dict, json_file, indent=4)

